import { FieldItem } from "@whzhuke/antd"

import { Button } from "antd"
import React from "react"

export const Field_name_status: FieldItem = {
  fieldType: "select",
  formItemConfig: {
    name: "status",
    style: { marginBottom: "1rem" }
  },
  config: {
    placeholder: "状态",
    options: [
      {
        label: "全部",
        value: ""
      },
      {
        label: "启用",
        value: "true"
      },
      {
        label: "禁用",
        value: "false"
      }
    ]
  }
}

export const Field_name_id: FieldItem = {
  fieldType: "input",
  formItemConfig: {
    label: "id",
    name: "id",
    hidden: true
  }
}

export const Field_name_title: FieldItem = {
  fieldType: "input",
  formItemConfig: {
    name: "title"
  },
  config: {
    placeholder: "请输入名称"
  }
}
export const Field_keyword: FieldItem = {
  fieldType: "input",
  formItemConfig: {
    name: "keyword"
  },
  config: {
    placeholder: "请输入关键字"
  }
}
export const Field_Search: FieldItem = {
  fieldType: "diy",
  component: (
    <Button
      htmlType="submit"
      type="primary"
      style={{
        marginBottom: "1rem"
      }}
    >
      查询
    </Button>
  )
}
export const Field_FormSave: FieldItem = {
  fieldType: "diy",
  component: (
    <Button
      htmlType="submit"
      type="primary"
      style={{
        marginBottom: "1rem"
      }}
    >
      保存
    </Button>
  )
}

export const Field_Reset: FieldItem = {
  fieldType: "diy",
  component: (
    <Button
      htmlType="reset"
      style={{
        marginBottom: "1rem"
      }}
    >
      重置
    </Button>
  )
}

export const Field_name_Role_Id: FieldItem = {
  fieldType: "input",
  formItemConfig: {
    label: "roleId",
    name: "roleId",
    hidden: true
  }
}
